Builtin Types Viewed as Inductive Families

نویسندگان

چکیده

Abstract State of the art optimisation passes for dependently typed languages can help erase redundant information typical invariant-rich data structures and programs. These automated processes do not dramatically change structure data, even though more efficient representations could be available. Using Quantitative Type Theory as implemented in Idris 2, we demonstrate how to define an invariant-rich, typechecking-time packing runtime representation together with irrelevant invariants. The compiler then aggressively all such invariants during compilation. Unlike other approaches, complexity resulting is entirely predictable, require both have same structure, yet are able seamlessly program if were using high-level structure.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Quotient inductive-inductive types

Higher inductive types (HITs) in Homotopy Type Theory (HoTT) allow the definition of datatypes which have constructors for equalities over the defined type. HITs generalise quotient types, and allow to define types which are not sets in the sense of HoTT (i.e. do not satisfy uniqueness of equality proofs) such as spheres, suspensions and the torus. However, there are also interesting uses of HI...

متن کامل

A Syntax for Higher Inductive-Inductive Types∗

Higher inductive-inductive types (HIITs) generalise inductive types of dependent type theories in two directions. On the one hand they allow the simultaneous definition of multiple sorts that can be indexed over each other. On the other hand they support equality constructors, thus generalising higher inductive types of homotopy type theory. Examples that make use of both features are the Cauch...

متن کامل

Refining Inductive Types

Dependently typed programming languages allow sophisticated properties of data to be expressed within the type system. Of particular use in dependently typed programming are indexed types that refine data by computationally useful information. For example, the N-indexed type of vectors refines lists by their lengths. Other data types may be refined in similar ways, but programmers must produce ...

متن کامل

Knowledge as Viewed by Muslim

  There are three views among Muslim thinkers concerning the nature of knowledge. Fakhr al-Din Razi holds that knowledge is self- evident and notdefinable, while Juwaini and his pupil Ghazzali hold that the concept of knowledge is theoretical and its definition is also too hard. There is another approach by the majority of Muslim theologians and philosophers who maintain that the concept of kn...

متن کامل

Order-Sorted Inductive Types

System F ! is an extension of system F ! with subtyping and bounded quantiication. Order-sorted algebra is an extension of many-sorted algebra with overloading and subtyping. We combine both formalisms to obtain IF ! , a higher-order typed-calculus with subtyping, bounded quan-tiication and order-sorted inductive types, i.e. data types with built-in subtyping and overloading. Moreover we show t...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

ژورنال

عنوان ژورنال: Lecture Notes in Computer Science

سال: 2023

ISSN: ['1611-3349', '0302-9743']

DOI: https://doi.org/10.1007/978-3-031-30044-8_5